﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <!-- Web -->
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>登陆</title>
    <link rel="stylesheet" href="/static/login/css/aui.css">
    <link rel="stylesheet" href="/static/login/css/swiper.min.css">
    <link rel="stylesheet" href="/static/login/css/main.css">
    <style media="screen">
        html,body {
            background: white;
            height: 100%;
        }

        #app {
            width: 100%;
            height: 100%;
            padding: 2rem;
            padding-bottom: 0;
            display: flex;
            align-items: center;
            justify-content: space-around;
            flex-direction: column;
        }

        .logo {
            width: 5.5rem;
            margin: 0 auto;
        }

        .mid {
            width: 100%;
            margin-top: 4rem;
        }
        .row {
            width: 100%;
            height: 2.2rem;
            position: relative;
            border-bottom: 1px solid rgba(153,153,153,0.30);
        }
        .row:nth-of-type(1) {
            margin-bottom: 1rem;
        }

        .row img {
            width: 1rem;
            position: absolute;
            left: 0;
            top: 0.6rem;
        }

        .row input {
            width: 100%;
            height: 2.2rem;
            line-height: 2.2rem;
            padding-left: 1.5rem;
            font-family: PingFangSC-Regular;
            font-size: 15px;
            color: #333333;
            letter-spacing: 0;
        }

        input::-webkit-input-placeholder {
            font-family: PingFangSC-Regular;
            font-size: 15px;
            color: rgba(153,153,153,0.50);
            letter-spacing: 0;
        }

        .miss {
            width: 100%;
            line-height: 2.2rem;
            display: inline-block;
            font-family: PingFangSC-Regular;
            font-size: 14px;
            color: #4A90E2;
            letter-spacing: 0;
            text-align: right;
            text-decoration: underline;
        }

        .btm {
            width: 100%;
        }

        .btn:nth-child(1) {
            width: 100%;
            line-height: 2.2rem;
            background: #F9B701;
            border-radius: 6px;
            text-align: center;
            color: white;
        }

        .btn:nth-child(2) {
            display: block;
            width: 100%;
            line-height: 2.2rem;
            background: #FFFFFF;
            border-radius: 6px;
            text-align: center;
            color: #333333;
            margin-top: 0.5rem;
        }
        .opp{
            width: 100%;
            height: 100%;
            padding: 2rem;
            padding-bottom: 0;
            display: flex;
            align-items: center;
            justify-content: space-around;
            flex-direction: column;
        }

    </style>
</head>

<body>
<div id="" class="opp">
        
        <img src="/static/login/picture/login_logo.png" alt="" class="logo">
        <div class="mid">
            <div class="layui-form">
            <div class="row">
                <img src="/static/login/picture/phone.png" alt="">
                <input type="text" name="mobile" value="" v-model="loginmdata.username" placeholder="请输入手机号">
            </div>
            <div class="row">
                <img src="/static/login/picture/pass.png" alt="">
                <input type="password" name="password" v-model="loginmdata.password" value="" placeholder="请输入密码">
            </div>
            <a class="miss" href="{:url('forget_pwd')}">忘记密码</a>
            <div class="btm">
                <div class="btn" @click="login" lay-filter="sub" lay-submit>登录</div>
                <a class="btn" href="{:url('regist')}">创建账号</a>
            </div>
            </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/static/login/js/config.js"></script>
<script type="text/javascript" src="/static/login/js/newapp.js"></script>
<script type="text/javascript" src="/static/login/js/swiper.min.js"></script>
<script type="text/javascript" src="/static/login/js/moment.min.js"></script>

<script src="/static/user/js/mui.min.js"></script>
<script src="/static/plugins/layui/layui.js"></script>
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,$ = layui.jquery;
        // 登录提交监听
        form.on('submit(sub)', function (data) {
            var loading = layer.load(1, {shade: [0.1, '#fff']});
            $.post("{:url('index')}",data.field,function(res){
                layer.close(loading);
                if(res.code > 0){
                    layer.msg(res.msg,{time:1000,icon:1},function(){
                        location.href = "{:url('index/index')}";
                    });
                }else{
                    layer.msg(res.msg,{time:1000,icon:2});
                    $('.captcha img').attr('src','{:url("verify")}?id='+Math.random());
                }
            });
        })
    })
</script>
</html>
